package dao

import "gorm.io/gorm"

// 闲置表
type Goods struct {
	gorm.Model
	UserId   int     `gorm:"type:int(11);not null;comment:'用户id'"`
	Bank     int8    `gorm:"type:tinyint;default:0;comment:'手机品牌:0-OPPO,1-苹果,2-华为,3-小米,4-红米'"`
	BigSmall int8    `gorm:"type:tinyint;default:0;comment:'手机容量:0-64G,1-128G,2-256G,3-512G,4-1TB'"`
	BuyType  int8    `gorm:"type:tinyint;default:0;comment:'购买渠道:0-京东,1-淘宝,2-拼多多,3-得物,4-识货'"`
	Looks    int8    `gorm:"type:tinyint;default:0;comment:'手机成色:0-99新,1-95新,2-9成新,3-8成新,4-7成新'"`
	Price    float64 `gorm:"type:decimal(10,2);not null;comment:'价格'"`
	Status   int8    `gorm:"type:tinyint;default:0;comment:'闲置状态:0-正常售卖,1-已售馨'"`
}

// 自己的购买记录
type OwnGoods struct {
	gorm.Model
	UserId   int     `gorm:"type:int(11);not null;comment:'用户id'"`
	Bank     int8    `gorm:"type:tinyint;default:0;comment:'手机品牌:0-OPPO,1-苹果,2-华为,3-小米,4-红米'"`
	BigSmall int8    `gorm:"type:tinyint;default:0;comment:'手机容量:0-64G,1-128G,2-256G,3-512G,4-1TB'"`
	BuyType  int8    `gorm:"type:tinyint;default:0;comment:'购买渠道:0-京东,1-淘宝,2-拼多多,3-得物,4-识货'"`
	Looks    int8    `gorm:"type:tinyint;default:0;comment:'手机成色:0-99新,1-95新,2-9成新,3-8成新,4-7成新'"`
	Price    float64 `gorm:"type:decimal(10,2);not null;comment:'价格'"`
}
